<template>
  <a-modal :title="title" :width="800" :visible="visible" :confirm-loading="confirmLoading" cancel-text="关闭" @ok="submit" @cancel="closeModal">
    <a-spin :spinning="confirmLoading">
      <a-descriptions title="用户详情" bordered>
        <!-- <a-descriptions-item label="医院码" :span="3">{{detail.createTime}}</a-descriptions-item> -->
        <!-- <a-descriptions-item label="医院码使用状态" :span="3">
          <a-badge status="processing" :text="detail.status | evaStatusFilters" />
        </a-descriptions-item> -->

        <!-- <a-descriptions-item label="会员号">{{detail.memberId}}</a-descriptions-item> -->
        <a-descriptions-item label="姓名">{{detail.name}}</a-descriptions-item>
        <a-descriptions-item label="性别">{{detail.gender | genderFilters}}</a-descriptions-item>

        <a-descriptions-item label="电话">{{detail.tel}}</a-descriptions-item>
        <a-descriptions-item label="地区">{{detail.area}}</a-descriptions-item>
        <a-descriptions-item label="学校">{{detail.school}}</a-descriptions-item>

        <a-descriptions-item label="年级">{{detail.grade | gradeFilters}}</a-descriptions-item>
        <a-descriptions-item label="班级" :span="3">{{detail.clazz}}</a-descriptions-item>

        <a-descriptions-item label="语文">{{detail.chinese}}</a-descriptions-item>
        <a-descriptions-item label="数学">{{detail.maths}}</a-descriptions-item>
        <a-descriptions-item label="英语">{{detail.english}}</a-descriptions-item>

        <a-descriptions-item label="物理">{{detail.physics}}</a-descriptions-item>
        <a-descriptions-item label="化学">{{detail.chemistry}}</a-descriptions-item>
        <a-descriptions-item label="生物">{{detail.bio}}</a-descriptions-item>

        <a-descriptions-item label="政治" :span="3">{{detail.politics}}</a-descriptions-item>

        <a-descriptions-item label="班级排名">{{detail.classRank}}</a-descriptions-item>
        <a-descriptions-item label="年级排名">{{detail.gradeRank}}</a-descriptions-item>
        <a-descriptions-item label="区排名">{{detail.areaRank}}</a-descriptions-item>

        <a-descriptions-item label="创建时间">{{detail.createTime}}</a-descriptions-item>
        <a-descriptions-item label="使用时间" :span="2">{{detail.updateTime}}</a-descriptions-item>
        
      </a-descriptions>
    </a-spin>
  </a-modal>
</template>
<script>
import ApiTree from '@/api/personnel/accountDetail';
import { Slime } from '@/mixins/slime';
import { evaFiltersMixin } from "@/mixins/evaMixin";
export default {
  name: 'accountDetailModal',
  mixins: [Slime, evaFiltersMixin],
  data() {
    return {
      title: '编辑',
      detail: {},
    };
  },
  methods: {
    // 详情
    crudDetail(record) {
      this.visible = true;
      this.confirmLoading = true;
      ApiTree.getUserDetail(record.id)
        .then((res) => {
          this.detail = res.result
        })
        .finally(() => {
          this.confirmLoading = false;
        });
    },
    // 提交
    submit() {
      this.closeModal();
    },
    // 弹窗-关闭
    closeModal() {
      this.confirmLoading = false;
      this.visible = false;
      this.id = null
      this.$emit('closeModal');
    },
  },
};
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
</style>